﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
using LibNiconico.NiconicoApi.Internal;

namespace LibNiconico.NiconicoApi.Lives.PublishStatus
{
    /// <summary>
    /// ニコニコ生放送パブリッシュステータス取得レスポンス
    /// </summary>
    public sealed class NicoLiveGetPublishStatusResponse
    {
        /// <summary>
        /// 取得したパブリッシュステータスの取得
        /// </summary>
        public NicoLivePublishStatus PublishStatus { get; internal set; }

        private NicoLiveGetPublishStatusResponse(XDocument doc)
        {
            PublishStatus = NicoLivePublishStatus.Parse(doc.Root) ?? new NicoLivePublishStatus();
        }

        internal static NicoLiveGetPublishStatusResponse Parse(XDocument doc)
        {
            return new NicoLiveGetPublishStatusResponse(doc);
        }
    }
}
